Skip to content
This repository was archived by the owner on May 28, 2021. It is now read-only.

Allow defining Resource Requirements per container in the ClusterSpec #227

Merged
merged 1 commit into from
Sep 28, 2018

Conversation

KashifSaadat
Copy link

If default resource limits are defined too low for a namespace, the mysql-server container may fail to bootstrap / run successfully and hit OOMKilled errors.

This PR extends the MySQL ClusterSpec to allow defining custom resource requirements per container (server and agent), which are passed onto the StatefulSet definition.

@KashifSaadat
Copy link
Author

KashifSaadat commented Sep 28, 2018

Example:

apiVersion: mysql.oracle.com/v1alpha1
kind: Cluster
metadata:
  name: my-mysql-cluster
spec:
  resources:
    agent:
      limits:
        cpu: 500m
        memory: 512Mi
      requests:
        cpu: 100m
        memory: 128Mi
    server:
      limits:
        cpu: 2
        memory: 2Gi
      requests:
        cpu: 500m
        memory: 1Gi
  multiMaster: true
  members: 3
  ...

@KashifSaadat KashifSaadat force-pushed the add-resource-requirements branch from cfc7df0 to 946e2ed Compare September 28, 2018 11:04
Signed-off-by: Kashif Saadat <kashifsaadat@gmail.com>
@KashifSaadat KashifSaadat force-pushed the add-resource-requirements branch from 946e2ed to bdcfffb Compare September 28, 2018 11:04
Copy link

@prydie prydie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one, thanks @KashifSaadat!

@prydie prydie merged commit 194e751 into oracle:master Sep 28, 2018
@KashifSaadat
Copy link
Author

Thanks! :)

@KashifSaadat KashifSaadat deleted the add-resource-requirements branch September 28, 2018 13:10
@vmrm
Copy link

vmrm commented Jan 22, 2020

@prydie any plans to make new release with resources management? Hope to see any answer.
I saw a question in #248 but there is no answer.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants